;*****************************************************************
;* This stationery serves as the framework for a                 *
;* user application (single file, absolute assembly application) *
;* For a more comprehensive program that                         *
;* demonstrates the more advanced functionality of this          *
;* processor, please see the demonstration applications          *
;* located in the examples subdirectory of the                   *
;* Freescale CodeWarrior for the HC12 Program directory          *
;*****************************************************************

; export symbols
            XDEF Entry, _Startup            ; export 'Entry' symbol
            ABSENTRY Entry        ; for absolute assembly: mark this as application entry point



; Include derivative-specific definitions 
		INCLUDE 'derivative.inc' 

ROMStart    EQU  $4000  ; absolute address to place my code/constant data

Stack_f  equ  RAMEnd
Stack_i  equ  Stack_f - $128

Reset   equ   $fffe

Data    equ   RAMStart
Code    equ   ROMStart

; variable/data section

            ORG Data
 ; Insert here your data definition.
 N          equ     25
 var        ds.b     3
 value      ds.b     1

; code section
            ORG   Code

Entry:
_Startup:
            LDS   #Stack_f+1       ; initialize the stack pointer
mainLoop:
            ldaa #$0
            staa value
            movb #$ff,DDRB
volta       inc  value
            movb value,PORTB
            jsr   timeLoop
            ldaa  var
            beq   volta                                    
              
            
            
;**************************************************************
;*                 Interrupt Vectors                          *
;**************************************************************
            ORG   Reset
            DC.W  Entry           ; Reset Vector
